import React from 'react'

import styles from './tipsmodal.less'
import  './tipsmodal.less'
import { CSSTransition } from 'react-transition-group'
export default class Tipsmodal extends React.Component {
  //state 状态初始化
  constructor(props) {
    super(props)
  }
  
  render() {
    const {info, confirmText, cancelText, visible} = this.props
    return (
      // <div className={styles.tipsBox}>
       <div style={visible ? { display: 'block' } : { display: 'none' }}> 
        <div className={styles.mask}></div>
        <div className={styles.alert_moudel}>
          <p className={styles.alert_content}>
            <span>{info}</span>
          </p>
          <div className={styles.button_group}>
            <button className={styles.btn_cancel} onClick={()=>{this.props.cancel()}}>
              {cancelText}
            </button>
            <button className={styles.btn_comm} onClick={()=>{this.props.confirm()}}>
              {confirmText}
            </button>
          </div>
        </div>
        
      </div>
      
    )
  }
}
